package com.zx.repository;

import com.zx.entity.Collect;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CollectRepository extends JpaRepository<Collect,Integer> {
    List<Collect> findAllByUserId(Integer userId);

    List<Collect> findAllByFoodId(Integer foodId);

    Collect findByUserIdAndFoodId(Integer userId,Integer foodId);
}
